import { DataTypes } from "sequelize";
import datasource from '../../framework/datasource'
const User = datasource.define("user", {
    phone: {
        type: DataTypes.BIGINT,
        comment: "手机号码",
        allowNull: false,
        key: "phone-key",
        unique: true
    },
    email: {
        type: DataTypes.STRING(32),
        comment: "邮箱地址"
    },
    icon: DataTypes.STRING(128),
    password: DataTypes.STRING(64),
    registry: DataTypes.STRING(64),
    status: {
        type: DataTypes.INTEGER,
        defaultValue: -1,
        comment: "[-1: 未激活， 0: 已经注销, 1: 可用的]"
    },
}, {
    createdAt: "createTime",
    updatedAt: 'updateTime'
});

export {
    User
}